/**
 * 机构详细信息窗口
 */
Ext.namespace("Ext.ux.sysmeta");

Ext.ux.sysmeta.SysTableDetailWindow = Ext.extend(Ext.Window, {
	
	layout: 'fit',
	width: 800,
	height: 285,
	plain: true,
	modal: true,
	border: false,
	
	tableId: null,			//表ID
	owner:null,             //所属用户
	
	detailPanel: null,

	initComponent: function(){
		Ext.ux.sysmeta.SysTableDetailWindow.superclass.initComponent.call(this);
		
		var detailPanel = null;
		
		//编辑表信息
		if(this.tableId != null){
			detailPanel = new Ext.ux.sysmeta.SysTableDetailPanel({parentWinId:this.id, tableId:this.tableId, border:false});
		}
		//新增表
		else if(this.tableId == null){
				detailPanel = new Ext.ux.sysmeta.SysTableDetailPanel({parentWinId:this.id, border:false,owner:this.owner});
			}

		this.add(detailPanel);
		this.detailPanel = detailPanel;
	},
	
	showTableInfo: function(){
		this.detailPanel.loadTable(this.tableId);
		this.show();
	}
});